package com.wenda.homeschooedu.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.ForeignKey;

/**
 * 成绩类
 * 每一个Score的实体表示：哪一个学生(student)在哪一次考试(examName)的哪一门课(subjectName)中获得的成绩(score)
 * _id : 成绩记录的编号 student ：学生 subjectName ：课程名 examName
 * ：考试名（如：第一月月考，第二月月考，期中测试，期末测试） score ： 分数
 * 
 * @author 周雨浓
 * 
 */
@Entity
@Table(name="score")
public class Score extends BaseModel{
	/**
	 * 
	 */
	private static final long serialVersionUID = 6100817753141439269L;
	private int _id;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(nullable=false)
	@ForeignKey(name="student_id")
	private Student student;
	private String student_name;
	private float chineseScore;
	private float mathScore;
	private float englishScore;
	private float total;

	public int get_id() {
		return _id;
	}

	public void set_id(int _id) {
		this._id = _id;
	}


	public String getStudent_name() {
		return student_name;
	}

	public void setStudent_name(String student_name) {
		this.student_name = student_name;
	}

	public float getChineseScore() {
		return chineseScore;
	}

	public void setChineseScore(float chineseScore) {
		this.chineseScore = chineseScore;
	}

	public float getMathScore() {
		return mathScore;
	}

	public void setMathScore(float mathScore) {
		this.mathScore = mathScore;
	}

	public float getEnglishScore() {
		return englishScore;
	}

	public void setEnglishScore(float englishScore) {
		this.englishScore = englishScore;
	}

	public float getTotal() {
		return total;
	}

	public void setTotal(float total) {
		this.total = total;
	}


	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

}
